<!DOCTYPE html>
<html>
<head>
    <meta content="width=750,user-scalable=no,viewport-fit=cover" name="viewport">
    <meta charset="UTF-8">
    <meta name="format-detection" content="telephone=no" />
    <script type="text/javascript" src="https://buffery.oss-cn-hangzhou.aliyuncs.com/zh_phaser.min.js" ></script>
    <title>错误页面01</title>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/style.min.css}" rel="stylesheet"/>
    <style>
        *{margin:0;padding:0;}
    </style>
</head>
<body>

<div id="error_404"></div>
<div style="text-align:center; height:300px; line-height:10px;">
    <a href="javascript:index()" class="btn btn-primary m-t">返回主页</a>
</div>

</body>
</html>
<script th:inline="javascript">
    var oDomW = document.documentElement.clientWidth || document.body.clientWidth;
    var oDomH = document.documentElement.clientHeight-300 || document.body.clientHeight-300;
    var game = new Phaser.Game(oDomW,oDomH,Phaser.CANVAS,"error_404");
    game.transparent = true;
    game.antialias = true;
    game.error_404 = {};
    game.error_404.start = {
        preload : function(){
            game.load.spritesheet("error","https://buffery.oss-cn-hangzhou.aliyuncs.com/zh_error_404.png",440,510);
        },
        create : function(){
            var errorSprite = game.add.sprite(game.world.centerX,game.world.centerY-100,"error");
            errorSprite.anchor.setTo(0.5, 0.5);
            errorSprite.animations.add("errorAni",[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],10,true);
            errorSprite.animations.play("errorAni",5);
            errorSprite.scale.setTo(0.3,0.3);
            var errorText = game.add.text(game.world.centerX,game.world.centerY+100,"很抱歉,您访问的页面被外星人劫走了!",{fill:"#000",font:"30px 微软雅黑",align:"center"});
            errorText.anchor.setTo(0.5, 0.5);

        },
        update : function(){

        }
    };
    game.state.add("start",game.error_404.start);//加载进度函数
    game.state.start("start");				//执行加载进度函数

    var ctx = [[@{/}]];
    function index() {
        window.top.location = ctx + "index";
    }
</script>